<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>活动参与管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$('#my').click(function(){
				if(confirm('你确定？')){
					alert(1)
				}
			})
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
		
		
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li ><a href="${ctx}/activity/tActivity/list">活动列表</a></li>
		<li class="active"><a href="javascript:">活动参与列表</a></li>
	</ul>
	 <form:form id="searchForm" modelAttribute="order" action="${ctx}/activity/tActivity/joinList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<input id="activityId" name="activityId" type="hidden" value="${activityId}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li>
				<label class="control-label">用车时间：</label> <input type="text"
				id="departdate" name="departdateStr" maxlength="20"
				readonly class="input-small Wdate"
				value="${Order.departdateStr }"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});" />
			</li>
			<li><label>状态：</label>
			  <select name="orderstatus" class="input-medium">
				<option value="" >--请选择--</option>
				<option value="0" <c:if test="${ '0' eq order.orderstatus}">selected="selected"</c:if>>已支付</option>
				<option value="1" <c:if test="${ '1' eq order.orderstatus}">selected="selected"</c:if>>未支付</option>
				<option value="2" <c:if test="${ '2' eq order.orderstatus}">selected="selected"</c:if>>已退单</option>
				<option value="9" <c:if test="${ '9' eq order.orderstatus}">selected="selected"</c:if>>已取消</option>
			  </select></li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
			</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>订单号</th>
				<th>订单名称</th>
				<th>用车时间</th>
				<th>上车地点</th>
				<th>人数</th>
				<th>联系人</th>
				<th>联系方式</th>
				<th>金额</th>
				<th>备注</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<c:forEach items="${page.list}" var="order">
			<tr>
				<td>${order.orderid}</td>
				<td>${order.ordername}</td>
				<td><fmt:formatDate value="${order.departdate}" pattern="yyyy-MM-dd hh:mm" /> </td>
				<td>${order.boardaddr}</td>
				<td>${order.purchasenum}</td>
				<td>${order.contacts}</td>
				<td>${order.payertel}</td>
				<td>${order.dueamount}</td>
				<c:if test="${empty order.activityRemark}">
				<td>未备注</td>
				</c:if>
				<c:if test="${not empty order.activityRemark}">
				<td>${order.activityRemark}</td>
				</c:if>
				<c:if test="${order.orderstatus =='0'}">
				<td>已支付</td>
				</c:if>
				<c:if test="${order.orderstatus =='1'}">
				<td>未支付</td>
				</c:if>
				<c:if test="${order.orderstatus =='9'}">
				<td>已取消</td>
				</c:if>
				<c:if test="${order.orderstatus =='2'}">
				<td>已退单</td>
				</c:if>
				<td>
				<c:if test="${order.orderstatus =='0'}">
				    <span ><a  href="${ctx}/activity/tActivity/joinForm?orderid=${order.orderid}&activityId=${activityId}">备注编辑</a></span>
				</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>